from pydantic import BaseModel, Field

class UserBase(BaseModel):
    name: str
    nick_name: str


class UserCreate(UserBase):
    name: str
    nick_name: str
    password: str
    is_active: bool = Field(default=True)
    class Config:
        from_attributes = True


class UserIn(UserBase):
    password: str


class UserALL(UserBase):
    id: int
    password_hash: str
    created_at: str
    is_active: bool = Field(default=True)
    class Config:
        from_attributes = True

